package com.my.simple.service.dictionary;

import com.my.simple.entity.dictionary.DictionaryOption;
import com.my.simple.repository.dao.DictionaryOptionDao;
import com.my.simple.repository.dao.DictionaryTypeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictionaryService {

    @Autowired
    private DictionaryOptionDao dictionaryOptionDao;
    @Autowired
    private DictionaryTypeDao dictionaryTypeDao;

    public void addDictionaryOption(DictionaryOption dictionaryOptionItem) {
        dictionaryOptionDao.addDictionaryOption(dictionaryOptionItem);
    }

    public List<DictionaryOption> getDictionaryOptionByTypeId(Integer typeId) {
        return dictionaryOptionDao.getDictionaryOptionByTypeId(typeId);
    }

    public List<DictionaryOption> getAllDictionaryOption() {
        return dictionaryOptionDao.getAllDictionaryOption();
    }

}
